package com.ydj.app.protocol.http.cms;

import com.ydj.app.enumerate.BannerActionEnum;
import com.ydj.app.enumerate.MemberLevelEnum;
import com.ydj.framework.mysql.PageArgs;
import com.ydj.framework.protocol.JsonBaseResponse;
import com.ydj.framework.protocol.JsonPageResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@Accessors(chain = true)
public class CmsBannerListRes extends JsonPageResponse<CmsBannerListRes.CmsBannerListResItem> {

    public CmsBannerListRes(PageArgs pageArgs) {
        super(pageArgs);
    }

    @Getter
    @Setter
    @Accessors(chain = true)
    public static class CmsBannerListResItem {
        @ApiModelProperty(value = "ID", required = true)
        private Long id;

        @ApiModelProperty(value = "标题", required = true)
        private String title;

        @ApiModelProperty(value = "图片")
        @Column(columnDefinition = "varchar(300) comment '图片'")
        private String image;

        @ApiModelProperty(value = "排序", required = true)
        @Column(columnDefinition = "int default 0 comment '排序号'")
        private Integer orderNumber;

        @ApiModelProperty(value = "动作", required = true)
        private BannerActionEnum action;

        @ApiModelProperty(value = "跳转的URL")
        private String actionUrl;

        @ApiModelProperty(value = "会员等级", required = true)
        private List<MemberLevelEnum> memberLevelList;

        @ApiModelProperty(value = "是否上架", required = true)
        private Boolean enable;

        @ApiModelProperty(value = "备注", required = true)
        private String remark;
    }

}